package com.dao.oos;

import com.model.oos.OosDataModel;
import com.model.oos.OosImprovesModel;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

public interface OosImprovesDao {

    /**
     * 新增
     *
     * @author chenjun
     * @date 2022/03/10
     **/
    int insert(OosImprovesModel oosImprovesModel);


    int deleteByImpId(String impId);

    int deleteByOsId(String osId);

    List<OosImprovesModel> selectByImpId(String impId);

    /**
     * 刪除
     *
     * @author chenjun
     * @date 2022/03/10
     **/
    int delete(@Param("impId") String impId);

    /**
     * 更新
     *
     * @author chenjun
     * @date 2022/03/10
     **/
    int update(OosImprovesModel oosImprovesModel);

    int backUp(@Param("impId") String impId);

    /**
     * 根据osId，将整改措施状态更新为已完成（1）
     *
     * @author chenjun
     * @date 2022/03/10
     **/
    int updateCompleteByOsId(String osId);

    /**
     * 查询 根据主键 id 查询
     *
     * @author chenjun
     * @date 2022/03/10
     **/
    OosImprovesModel load(@Param("impId") String impId);


    // 列表
    List<OosImprovesModel> selectList(Map<String, Object> map);

    // 列表总数
    int selectListCount(Map<String, Object> map);

    // 根据osId，查询整改措施列表
    List<OosImprovesModel> selectListByOsId(Map<String, Object> map);

    List<OosDataModel> selectDepartmentalList(Map<String, Object> map);

    int selectDepartmentalListCount(Map<String, Object> map);


}